package cn.zyjblogs.server.role.mapper;

import cn.zyjblogs.server.role.po.RolePermissionRelPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhuyijun
 */
@Mapper
public interface RolePermissionRelMapper extends BaseMapper<RolePermissionRelPo> {
    /**
     * 通过角色id查询权限id集合
     *
     * @param roleId
     * @return
     * @author zhuyijun
     * @date 2022/9/24
     */
    List<String> findListByRoleId(@Param("roleId") String roleId, @Param("tenantId") String tenantId);

    /**
     * 通过角色id集合查询权限id集合
     *
     * @param roleId
     * @return
     * @author zhuyijun
     * @date 2022/9/24
     */
    List<String> findListByRoleIds(@Param("roleIds") List<String> roleId, @Param("tenantId") String tenantId);
}
